package com.glsc.ngateway.opmanage.event;

import com.glsc.ngateway.opmanage.event.vo.TradeSeatApplicationEvent;
import com.glsc.ngateway.opmanage.service.other.TradeSeatFeesService;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class TradeSeatEventListener implements ApplicationListener<TradeSeatApplicationEvent> {

    @Resource
    private TradeSeatFeesService tradeSeatFeesService;

    @Override
    public void onApplicationEvent(TradeSeatApplicationEvent event) {
        tradeSeatFeesService.dealDisableTradeSeat(event.getBeforeState(), event.getAfterState(),
                event.getTradeSeatCode(), event.getBeginDate(), event.getEndDate(), event.getBeginDate2());
    }
}
